import API from '@/api';
import { request, serialize } from '@/utils';

// token
export function token() {
    return request({
        url: `${API.admin.token.url}`,
        method: 'get',
        data: null
    });
}

// roles
export function roles() {
    return request({
        url: `${API.admin.roles.url}`,
        method: 'get',
        data: null
    });
}

// 萤石云获取 token 信息
export function getAccessToken(data) {
    return request({
        url: `https://open.ys7.com/api/lapp/token/get`,
        method: 'post',
        data: serialize(data)
    });
}